#k=0
k = 0
#a=询问
a=int(input())
#当a!=0就循环
while a!=0:
    #b=a%10
    b = a % 10
    #k=k*10+b
    k = k*10+b
    #a=a/10
    a = int(a/10)
#打印k
print(k)